package com.ibm.mall.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ibm.mall.dao.OrderFormDao;
import com.ibm.mall.model.OrderForm;
import com.ibm.mall.model.PageBean;
import com.ibm.mall.service.OrderFormService;
import com.ibm.mall.util.QueryHelper;

@Service
@Transactional
public class OrderFormServiceImpl implements OrderFormService {

	@Resource
	private OrderFormDao orderFormDao;

	@Override
	public Integer saveOrder(OrderForm order) {
		return orderFormDao.save(order);
	}

	@Override
	public PageBean getPageBean(Integer pageNum, int pageSize,
			QueryHelper queryHelper) {
		return orderFormDao.getPageBean(pageNum, pageSize, queryHelper);
	}

	@Override
	public OrderForm getOrderFormById(Integer orderId) {
		return orderFormDao.getById(orderId);
	}

	@Override
	public void updateOrderForm(OrderForm orderForm) {
		orderFormDao.update(orderForm);
	}
}
